home *** CD-ROM | disk | FTP | other *** search
- /*
- * switch.c
- * by Gaige B. Paulsen
- ****************************************************************************
- * Part of NCSA Telnet for the Macintosh *
- * *
- * Uses : *
- * TCP/IP kernel for NCSA Telnet *
- * by Tim Krauskopf *
- * with Macintosh code by Gaige B. Paulsen *
- * *
- * National Center for Supercomputing Applications *
- * 152 Computing Applications Building *
- * 605 E. Springfield Ave. *
- * Champaign, IL 61820 *
- * *
- * *
- ****************************************************************************
- *
- * Switcher interface code for NCSA Telnet for the Macintosh
- *
- * Called by:
- * maclook.c
- */
-
- #include <Dialogs.h>
- #include <Memory.h>
-
- #include "configrec.h"
- #include "maclook.h"
-
- #ifdef MPW
- #include "mpw.h"
- #endif
-
- #define Ptr char *
-
- typedef struct {
- Ptr worldPtr[8]; /* the world table */
- Ptr hostTask; /* Who owns this joint anyway? */
- Ptr TheTask; /* Who is on stage ? */
-
- } switchStruct, *switchPtr, **switchHdl;
-
- int initBKGR(),netsleep(),BKGRtask();
-
- int initswitch
- (
- void
- )
- {
- switchPtr switcher;
- switchHdl switcherH= (switchHdl) 0x282L;
- char **ptr;
-
- if (( *switcherH ==(switchHdl) 0L) || ( *switcherH ==(switchHdl) -1L) )
- return(0);
-
- putln("WARNING!! You are running under switcher. I may throw up! ");
-
- switcher = *switcherH;
-
- ptr= ((char **)ApplicZone()) -3L; /* Set up our bkgrnd task 3 * 4 = 12*/
- (*ptr) = (char *) BKGRtask;
-
- initBKGR( netsleep ); /* And tell it where to go */
-
- return(-1); /* Yes we are under switcher .... */
- }
-